%%{init: {'themeVariables': { 'fontSize': '12px'}}}%%
graph TD
    classDef path fill:#eee,stroke:#000,color:#000
    classDef plan fill:#fff,stroke-width:1px,color:#000
    classDef itemplan fill:#fff,stroke-width:2px,color:#000
    classDef unbatchedplan fill:#dff,stroke-width:1px,color:#000
    classDef sideeffectplan fill:#fcc,stroke-width:2px,color:#000
    classDef bucket fill:#f6f6f6,color:#000,stroke-width:2px,text-align:left

    subgraph "Buckets for queries/v4/js-reserved-table-names"
    Bucket0("Bucket 0 (root)<br /><br />1: <br />ᐳ: 8, 9, 120, 121, 122, 123, 124, 125, 126, 127, 128, 10<br />2: 7, 12, 18, 24, 29, 32, 37, 42, 45, 51, 56, 59, 65, 71<br />3: 15, 21, 27, 35, 40, 48, 54, 62, 68, 74, 76, 77, 78, 79<br />ᐳ: 14, 16, 20, 22, 26, 28, 34, 36, 39, 41, 47, 49, 53, 55, 61, 63, 67, 69, 73, 75"):::bucket
    Bucket1("Bucket 1 (nullableBoundary)<br />Deps: 16<br /><br />ROOT PgSelectSingleᐸconstructorᐳ[16]"):::bucket
    Bucket2("Bucket 2 (nullableBoundary)<br />Deps: 22<br /><br />ROOT PgSelectSingleᐸconstructorᐳ[22]"):::bucket
    Bucket3("Bucket 3 (nullableBoundary)<br />Deps: 28<br /><br />ROOT PgSelectSingleᐸconstructorᐳ[28]"):::bucket
    Bucket4("Bucket 4 (nullableBoundary)<br />Deps: 36<br /><br />ROOT PgSelectSingleᐸyieldᐳ[36]"):::bucket
    Bucket5("Bucket 5 (nullableBoundary)<br />Deps: 41<br /><br />ROOT PgSelectSingleᐸyieldᐳ[41]"):::bucket
    Bucket6("Bucket 6 (nullableBoundary)<br />Deps: 49<br /><br />ROOT PgSelectSingleᐸ__proto__ᐳ[49]"):::bucket
    Bucket7("Bucket 7 (nullableBoundary)<br />Deps: 55<br /><br />ROOT PgSelectSingleᐸ__proto__ᐳ[55]"):::bucket
    Bucket8("Bucket 8 (nullableBoundary)<br />Deps: 63<br /><br />ROOT PgSelectSingleᐸnullᐳ[63]"):::bucket
    Bucket9("Bucket 9 (nullableBoundary)<br />Deps: 69<br /><br />ROOT PgSelectSingleᐸnullᐳ[69]"):::bucket
    Bucket10("Bucket 10 (nullableBoundary)<br />Deps: 75<br /><br />ROOT PgSelectSingleᐸnullᐳ[75]"):::bucket
    Bucket11("Bucket 11 (listItem)<br /><br />ROOT __Item{11}ᐸ76ᐳ[80]"):::bucket
    Bucket12("Bucket 12 (listItem)<br /><br />ROOT __Item{12}ᐸ77ᐳ[82]"):::bucket
    Bucket13("Bucket 13 (listItem)<br /><br />ROOT __Item{13}ᐸ78ᐳ[84]"):::bucket
    Bucket14("Bucket 14 (listItem)<br /><br />ROOT __Item{14}ᐸ79ᐳ[86]"):::bucket
    end
    Bucket0 --> Bucket1 & Bucket2 & Bucket3 & Bucket4 & Bucket5 & Bucket6 & Bucket7 & Bucket8 & Bucket9 & Bucket10 & Bucket11 & Bucket12 & Bucket13 & Bucket14

    %% plan dependencies
    Object10{{"Object[10∈0] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Access8{{"Access[8∈0] ➊<br />ᐸ2.pgSettingsᐳ"}}:::plan
    Access9{{"Access[9∈0] ➊<br />ᐸ2.withPgClientᐳ"}}:::plan
    Access8 & Access9 --> Object10
    PgSelect12[["PgSelect[12∈0] ➊<br />ᐸconstructorᐳ<br />More deps:<br />- Constantᐸ'Copper Wire'ᐳ[120]"]]:::plan
    Object10 --> PgSelect12
    PgSelect18[["PgSelect[18∈0] ➊<br />ᐸconstructorᐳ<br />More deps:<br />- Constantᐸ2ᐳ[121]"]]:::plan
    Object10 --> PgSelect18
    PgSelect24[["PgSelect[24∈0] ➊<br />ᐸconstructorᐳ<br />More deps:<br />- Constantᐸ'Iron Mine'ᐳ[122]"]]:::plan
    Object10 --> PgSelect24
    PgSelect32[["PgSelect[32∈0] ➊<br />ᐸyieldᐳ<br />More deps:<br />- Constantᐸ'UK'ᐳ[123]"]]:::plan
    Object10 --> PgSelect32
    PgSelect37[["PgSelect[37∈0] ➊<br />ᐸyieldᐳ<br />More deps:<br />- Constantᐸ2ᐳ[121]"]]:::plan
    Object10 --> PgSelect37
    PgSelect45[["PgSelect[45∈0] ➊<br />ᐸ__proto__ᐳ<br />More deps:<br />- Constantᐸ1ᐳ[124]"]]:::plan
    Object10 --> PgSelect45
    PgSelect51[["PgSelect[51∈0] ➊<br />ᐸ__proto__ᐳ<br />More deps:<br />- Constantᐸ'VCS'ᐳ[125]"]]:::plan
    Object10 --> PgSelect51
    PgSelect59[["PgSelect[59∈0] ➊<br />ᐸnullᐳ<br />More deps:<br />- Constantᐸ'10 am'ᐳ[126]"]]:::plan
    Object10 --> PgSelect59
    PgSelect65[["PgSelect[65∈0] ➊<br />ᐸnullᐳ<br />More deps:<br />- Constantᐸ'flat'ᐳ[127]"]]:::plan
    Object10 --> PgSelect65
    PgSelect71[["PgSelect[71∈0] ➊<br />ᐸnullᐳ<br />More deps:<br />- Constantᐸ3ᐳ[128]"]]:::plan
    Object10 --> PgSelect71
    PgSelect7[["PgSelect[7∈0] ➊<br />ᐸconstructorᐳ"]]:::plan
    Object10 --> PgSelect7
    __Value2["__Value[2∈0] ➊<br />ᐸcontextᐳ"]:::plan
    __Value2 --> Access8
    __Value2 --> Access9
    First14{{"First[14∈0] ➊"}}:::plan
    PgSelectRows15[["PgSelectRows[15∈0] ➊"]]:::plan
    PgSelectRows15 --> First14
    PgSelect12 --> PgSelectRows15
    PgSelectSingle16{{"PgSelectSingle[16∈0] ➊<br />ᐸconstructorᐳ"}}:::plan
    First14 --> PgSelectSingle16
    First20{{"First[20∈0] ➊"}}:::plan
    PgSelectRows21[["PgSelectRows[21∈0] ➊"]]:::plan
    PgSelectRows21 --> First20
    PgSelect18 --> PgSelectRows21
    PgSelectSingle22{{"PgSelectSingle[22∈0] ➊<br />ᐸconstructorᐳ"}}:::plan
    First20 --> PgSelectSingle22
    First26{{"First[26∈0] ➊"}}:::plan
    PgSelectRows27[["PgSelectRows[27∈0] ➊"]]:::plan
    PgSelectRows27 --> First26
    PgSelect24 --> PgSelectRows27
    PgSelectSingle28{{"PgSelectSingle[28∈0] ➊<br />ᐸconstructorᐳ"}}:::plan
    First26 --> PgSelectSingle28
    PgSelect29[["PgSelect[29∈0] ➊<br />ᐸyieldᐳ"]]:::plan
    Object10 --> PgSelect29
    First34{{"First[34∈0] ➊"}}:::plan
    PgSelectRows35[["PgSelectRows[35∈0] ➊"]]:::plan
    PgSelectRows35 --> First34
    PgSelect32 --> PgSelectRows35
    PgSelectSingle36{{"PgSelectSingle[36∈0] ➊<br />ᐸyieldᐳ"}}:::plan
    First34 --> PgSelectSingle36
    First39{{"First[39∈0] ➊"}}:::plan
    PgSelectRows40[["PgSelectRows[40∈0] ➊"]]:::plan
    PgSelectRows40 --> First39
    PgSelect37 --> PgSelectRows40
    PgSelectSingle41{{"PgSelectSingle[41∈0] ➊<br />ᐸyieldᐳ"}}:::plan
    First39 --> PgSelectSingle41
    PgSelect42[["PgSelect[42∈0] ➊<br />ᐸ__proto__ᐳ"]]:::plan
    Object10 --> PgSelect42
    First47{{"First[47∈0] ➊"}}:::plan
    PgSelectRows48[["PgSelectRows[48∈0] ➊"]]:::plan
    PgSelectRows48 --> First47
    PgSelect45 --> PgSelectRows48
    PgSelectSingle49{{"PgSelectSingle[49∈0] ➊<br />ᐸ__proto__ᐳ"}}:::plan
    First47 --> PgSelectSingle49
    First53{{"First[53∈0] ➊"}}:::plan
    PgSelectRows54[["PgSelectRows[54∈0] ➊"]]:::plan
    PgSelectRows54 --> First53
    PgSelect51 --> PgSelectRows54
    PgSelectSingle55{{"PgSelectSingle[55∈0] ➊<br />ᐸ__proto__ᐳ"}}:::plan
    First53 --> PgSelectSingle55
    PgSelect56[["PgSelect[56∈0] ➊<br />ᐸnullᐳ"]]:::plan
    Object10 --> PgSelect56
    First61{{"First[61∈0] ➊"}}:::plan
    PgSelectRows62[["PgSelectRows[62∈0] ➊"]]:::plan
    PgSelectRows62 --> First61
    PgSelect59 --> PgSelectRows62
    PgSelectSingle63{{"PgSelectSingle[63∈0] ➊<br />ᐸnullᐳ"}}:::plan
    First61 --> PgSelectSingle63
    First67{{"First[67∈0] ➊"}}:::plan
    PgSelectRows68[["PgSelectRows[68∈0] ➊"]]:::plan
    PgSelectRows68 --> First67
    PgSelect65 --> PgSelectRows68
    PgSelectSingle69{{"PgSelectSingle[69∈0] ➊<br />ᐸnullᐳ"}}:::plan
    First67 --> PgSelectSingle69
    First73{{"First[73∈0] ➊"}}:::plan
    PgSelectRows74[["PgSelectRows[74∈0] ➊"]]:::plan
    PgSelectRows74 --> First73
    PgSelect71 --> PgSelectRows74
    PgSelectSingle75{{"PgSelectSingle[75∈0] ➊<br />ᐸnullᐳ"}}:::plan
    First73 --> PgSelectSingle75
    PgSelectRows76[["PgSelectRows[76∈0] ➊"]]:::plan
    PgSelect7 --> PgSelectRows76
    PgSelectRows77[["PgSelectRows[77∈0] ➊"]]:::plan
    PgSelect29 --> PgSelectRows77
    PgSelectRows78[["PgSelectRows[78∈0] ➊"]]:::plan
    PgSelect42 --> PgSelectRows78
    PgSelectRows79[["PgSelectRows[79∈0] ➊"]]:::plan
    PgSelect56 --> PgSelectRows79
    PgClassExpression88{{"PgClassExpression[88∈1] ➊<br />ᐸ__constructor__.”name”ᐳ"}}:::plan
    PgSelectSingle16 --> PgClassExpression88
    PgClassExpression98{{"PgClassExpression[98∈1] ➊<br />ᐸ__constructor__.”id”ᐳ"}}:::plan
    PgClassExpression88 o--o PgClassExpression98
    PgClassExpression89{{"PgClassExpression[89∈2] ➊<br />ᐸ__construc..._.”export”ᐳ"}}:::plan
    PgSelectSingle22 --> PgClassExpression89
    PgClassExpression99{{"PgClassExpression[99∈2] ➊<br />ᐸ__constructor__.”name”ᐳ"}}:::plan
    PgClassExpression89 o--o PgClassExpression99
    PgClassExpression90{{"PgClassExpression[90∈3] ➊<br />ᐸ__construc..._.”export”ᐳ"}}:::plan
    PgSelectSingle28 --> PgClassExpression90
    PgClassExpression100{{"PgClassExpression[100∈3] ➊<br />ᐸ__constructor__.”id”ᐳ"}}:::plan
    PgClassExpression90 o--o PgClassExpression100
    PgClassExpression91{{"PgClassExpression[91∈4] ➊<br />ᐸ__yield__.”crop”ᐳ"}}:::plan
    PgSelectSingle36 --> PgClassExpression91
    PgClassExpression101{{"PgClassExpression[101∈4] ➊<br />ᐸ__yield__.”id”ᐳ"}}:::plan
    PgClassExpression91 o--o PgClassExpression101
    PgClassExpression92{{"PgClassExpression[92∈5] ➊<br />ᐸ__yield__.”crop”ᐳ"}}:::plan
    PgSelectSingle41 --> PgClassExpression92
    PgClassExpression102{{"PgClassExpression[102∈5] ➊<br />ᐸ__yield__.”export”ᐳ"}}:::plan
    PgClassExpression92 o--o PgClassExpression102
    PgClassExpression93{{"PgClassExpression[93∈6] ➊<br />ᐸ__proto__.”brand”ᐳ"}}:::plan
    PgSelectSingle49 --> PgClassExpression93
    PgClassExpression103{{"PgClassExpression[103∈6] ➊<br />ᐸ__proto__.”name”ᐳ"}}:::plan
    PgClassExpression93 o--o PgClassExpression103
    PgClassExpression94{{"PgClassExpression[94∈7] ➊<br />ᐸ__proto__.”brand”ᐳ"}}:::plan
    PgSelectSingle55 --> PgClassExpression94
    PgClassExpression104{{"PgClassExpression[104∈7] ➊<br />ᐸ__proto__.”id”ᐳ"}}:::plan
    PgClassExpression94 o--o PgClassExpression104
    PgClassExpression95{{"PgClassExpression[95∈8] ➊<br />ᐸ__null__.”...nProperty”ᐳ"}}:::plan
    PgSelectSingle63 --> PgClassExpression95
    PgClassExpression105{{"PgClassExpression[105∈8] ➊<br />ᐸ__null__.”id”ᐳ"}}:::plan
    PgClassExpression95 o--o PgClassExpression105
    PgClassExpression96{{"PgClassExpression[96∈9] ➊<br />ᐸ__null__.”break”ᐳ"}}:::plan
    PgSelectSingle69 --> PgClassExpression96
    PgClassExpression106{{"PgClassExpression[106∈9] ➊<br />ᐸ__null__.”id”ᐳ"}}:::plan
    PgClassExpression96 o--o PgClassExpression106
    PgClassExpression97{{"PgClassExpression[97∈10] ➊<br />ᐸ__null__.”break”ᐳ"}}:::plan
    PgSelectSingle75 --> PgClassExpression97
    PgClassExpression107{{"PgClassExpression[107∈10] ➊<br />ᐸ__null__.”...nProperty”ᐳ"}}:::plan
    PgClassExpression97 o--o PgClassExpression107
    __Item80[/"__Item[80∈11]<br />ᐸ76ᐳ"\]:::itemplan
    PgSelectRows76 ==> __Item80
    PgSelectSingle81{{"PgSelectSingle[81∈11]<br />ᐸconstructorᐳ"}}:::plan
    __Item80 --> PgSelectSingle81
    PgClassExpression108{{"PgClassExpression[108∈11]<br />ᐸ__constructor__.”name”ᐳ"}}:::plan
    PgSelectSingle81 --> PgClassExpression108
    PgClassExpression112{{"PgClassExpression[112∈11]<br />ᐸ__construc..._.”export”ᐳ"}}:::plan
    PgClassExpression108 o--o PgClassExpression112
    PgClassExpression116{{"PgClassExpression[116∈11]<br />ᐸ__constructor__.”id”ᐳ"}}:::plan
    PgClassExpression112 o--o PgClassExpression116
    __Item82[/"__Item[82∈12]<br />ᐸ77ᐳ"\]:::itemplan
    PgSelectRows77 ==> __Item82
    PgSelectSingle83{{"PgSelectSingle[83∈12]<br />ᐸyieldᐳ"}}:::plan
    __Item82 --> PgSelectSingle83
    PgClassExpression109{{"PgClassExpression[109∈12]<br />ᐸ__yield__.”crop”ᐳ"}}:::plan
    PgSelectSingle83 --> PgClassExpression109
    PgClassExpression113{{"PgClassExpression[113∈12]<br />ᐸ__yield__.”export”ᐳ"}}:::plan
    PgClassExpression109 o--o PgClassExpression113
    PgClassExpression117{{"PgClassExpression[117∈12]<br />ᐸ__yield__.”id”ᐳ"}}:::plan
    PgClassExpression113 o--o PgClassExpression117
    __Item84[/"__Item[84∈13]<br />ᐸ78ᐳ"\]:::itemplan
    PgSelectRows78 ==> __Item84
    PgSelectSingle85{{"PgSelectSingle[85∈13]<br />ᐸ__proto__ᐳ"}}:::plan
    __Item84 --> PgSelectSingle85
    PgClassExpression110{{"PgClassExpression[110∈13]<br />ᐸ__proto__.”id”ᐳ"}}:::plan
    PgSelectSingle85 --> PgClassExpression110
    PgClassExpression114{{"PgClassExpression[114∈13]<br />ᐸ__proto__.”name”ᐳ"}}:::plan
    PgClassExpression110 o--o PgClassExpression114
    PgClassExpression118{{"PgClassExpression[118∈13]<br />ᐸ__proto__.”brand”ᐳ"}}:::plan
    PgClassExpression114 o--o PgClassExpression118
    __Item86[/"__Item[86∈14]<br />ᐸ79ᐳ"\]:::itemplan
    PgSelectRows79 ==> __Item86
    PgSelectSingle87{{"PgSelectSingle[87∈14]<br />ᐸnullᐳ"}}:::plan
    __Item86 --> PgSelectSingle87
    PgClassExpression111{{"PgClassExpression[111∈14]<br />ᐸ__null__.”break”ᐳ"}}:::plan
    PgSelectSingle87 --> PgClassExpression111
    PgClassExpression115{{"PgClassExpression[115∈14]<br />ᐸ__null__.”...nProperty”ᐳ"}}:::plan
    PgClassExpression111 o--o PgClassExpression115
    PgClassExpression119{{"PgClassExpression[119∈14]<br />ᐸ__null__.”id”ᐳ"}}:::plan
    PgClassExpression115 o--o PgClassExpression119

    %% define steps
    classDef bucket0 stroke:#696969
    class Bucket0,__Value2,PgSelect7,Access8,Access9,Object10,PgSelect12,First14,PgSelectRows15,PgSelectSingle16,PgSelect18,First20,PgSelectRows21,PgSelectSingle22,PgSelect24,First26,PgSelectRows27,PgSelectSingle28,PgSelect29,PgSelect32,First34,PgSelectRows35,PgSelectSingle36,PgSelect37,First39,PgSelectRows40,PgSelectSingle41,PgSelect42,PgSelect45,First47,PgSelectRows48,PgSelectSingle49,PgSelect51,First53,PgSelectRows54,PgSelectSingle55,PgSelect56,PgSelect59,First61,PgSelectRows62,PgSelectSingle63,PgSelect65,First67,PgSelectRows68,PgSelectSingle69,PgSelect71,First73,PgSelectRows74,PgSelectSingle75,PgSelectRows76,PgSelectRows77,PgSelectRows78,PgSelectRows79 bucket0
    classDef bucket1 stroke:#00bfff
    class Bucket1,PgClassExpression88,PgClassExpression98 bucket1
    classDef bucket2 stroke:#7f007f
    class Bucket2,PgClassExpression89,PgClassExpression99 bucket2
    classDef bucket3 stroke:#ffa500
    class Bucket3,PgClassExpression90,PgClassExpression100 bucket3
    classDef bucket4 stroke:#0000ff
    class Bucket4,PgClassExpression91,PgClassExpression101 bucket4
    classDef bucket5 stroke:#7fff00
    class Bucket5,PgClassExpression92,PgClassExpression102 bucket5
    classDef bucket6 stroke:#ff1493
    class Bucket6,PgClassExpression93,PgClassExpression103 bucket6
    classDef bucket7 stroke:#808000
    class Bucket7,PgClassExpression94,PgClassExpression104 bucket7
    classDef bucket8 stroke:#dda0dd
    class Bucket8,PgClassExpression95,PgClassExpression105 bucket8
    classDef bucket9 stroke:#ff0000
    class Bucket9,PgClassExpression96,PgClassExpression106 bucket9
    classDef bucket10 stroke:#ffff00
    class Bucket10,PgClassExpression97,PgClassExpression107 bucket10
    classDef bucket11 stroke:#00ffff
    class Bucket11,__Item80,PgSelectSingle81,PgClassExpression108,PgClassExpression112,PgClassExpression116 bucket11
    classDef bucket12 stroke:#4169e1
    class Bucket12,__Item82,PgSelectSingle83,PgClassExpression109,PgClassExpression113,PgClassExpression117 bucket12
    classDef bucket13 stroke:#3cb371
    class Bucket13,__Item84,PgSelectSingle85,PgClassExpression110,PgClassExpression114,PgClassExpression118 bucket13
    classDef bucket14 stroke:#a52a2a
    class Bucket14,__Item86,PgSelectSingle87,PgClassExpression111,PgClassExpression115,PgClassExpression119 bucket14

